package com.swadar.helper;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.swadar.beans.dataobject.BrandDO;
import com.swadar.beans.dataobject.CategoryDO;
import com.swadar.beans.valueobject.ProductVO;
import com.swadar.dao.CommonDAO;

@Component
public class ProductHomeHelper {

	@Autowired
	private CommonDAO commonDAO;
	
	public List<ProductVO> getProductList(Long categoryId, Long brandId){
		List<ProductVO> productList = commonDAO.getProductList(categoryId, brandId);
		return productList;
	}
    
	public List<CategoryDO> getCategoryList(){
		List<CategoryDO> categoryList = commonDAO.getCategoryList();
		return categoryList;
	}
	
	public List<BrandDO> getBrandName(Long categoryId){
		List<BrandDO> brandNameList = commonDAO.getBrandList(categoryId);
		return brandNameList;
	}
	
	public List<BrandDO> getBrandImage(){
		List<BrandDO> imageList = commonDAO.getBrandImage();
		return imageList;
	}
	
}

